package com.easylinkin.linkappapi.mechanical.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.easylinkin.linkappapi.common.model.RequestModel;
import com.easylinkin.linkappapi.device.entity.Device;
import com.easylinkin.linkappapi.mechanical.entity.Mechanical;
import org.springframework.scheduling.annotation.Scheduled;

/**
 * 铁路机械表 服务类
 *
 * @author xy
 * @since 2025-06-11
 */
public interface IMechanicalService extends IService<Mechanical> {
    IPage<Mechanical> listPage(RequestModel<Mechanical> requestModel);

    Mechanical queryById(String id);

    Mechanical queryMechanicalByDeviceCode(String deviceId, String tenantId);

    Device queryDeviceByMechanicalIdAndType(String mechanicalId, String type);

    @Scheduled(cron = "0 0 0 * * ?")
    void doDeparture();

    void setOutTimeNull(String id);
}